@using BlazorApp.Pages.Common.Html
@using Extension
@using k8s.Models
@inherits PageBase

@if (ManagedFields is { Count: > 0 })
{
    <HTableColumn Title=@L["ManagedFields"] ExplainField="@ExplainField">
        @foreach (var entry in ManagedFields)
        {
            <div>
                <ColorfulTag>
                    @($"{entry.Manager} {entry.Operation} {entry.Time.GetValueOrDefault().ToLocalTime().ToFriendlyDisplay()}")
                </ColorfulTag>
            </div>
        }

    </HTableColumn>
}

@code {


    [Parameter] public IList<V1ManagedFieldsEntry> ManagedFields { get; set; }

    [Parameter] public string ExplainField { get; set; }

}
